#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>

int
main ()
{
  int pid;
  int status;

  if ((pid = vfork ()) < 0)
    {
      printf ("Error\n");
    }
  else if (pid == 0)
    {
      printf ("child\n");
      //exit (0);
      return 0; // error
    }
  else
    {
      printf ("parent\n");
      waitpid (pid, &status, 0);
    }

  return 0;
}
